//
//  CheckResultUserDefaults.h
//  MobileChecker
//
//  Created by Lymons on 15-1-6.
//  Copyright (c) 2015年 Lymons. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SimpleUserDefaults.h"

#define ITEM_RESULT_CHECKING        @"検測中..."
#define ITEM_RESULT_NO_CHECK        @"..."
#define ITEM_RESULT_OK              @"OK"
#define ITEM_RESULT_NG              @"NG"
#define ITEM_RESULT_NO_SUPPORT      @"機能無し"
#define ITEM_RESULT_NONE            @"---"
#define ITEM_RESULT_LOST1           @"減点１"
#define ITEM_RESULT_LOST2           @"減点２"
#define ITEM_RESULT_LOST3           @"減点３"
#define ITEM_RESULT_LOST            @"減点あり"
#define ITEM_RESULT_FOUND           @"有り"
#define ITEM_RESULT_NO_FOUND        @"無し"
#define ITEM_RESULT_UNKNOWN         @"不明"

#define API_ITEM_RESULT_UNKNOWN         @"F"
#define API_ITEM_RESULT_OK              @"K"
#define API_ITEM_RESULT_NG              @"9"
#define API_ITEM_RESULT_NO_SUPPORT      @"N"
#define API_ITEM_RESULT_1               @"1"
#define API_ITEM_RESULT_2               @"2"
#define API_ITEM_RESULT_3               @"3"

#define API_ITEM_RESULT_SIM_NO          @"K"
#define API_ITEM_RESULT_SIM_OK          @"X"
#define API_ITEM_RESULT_SIM_NO_SUPPORT  @"N"

#define API_RESULT_OK                   @"OK"
#define API_RESULT_LOST                 @"GE"
#define API_RESULT_NG                   @"NG"

typedef NS_ENUM(NSInteger, DiagnosisCheckResult) {
    DiagnosisCheckResultNoCheck = 0,
    DiagnosisCheckResultNone,
    DiagnosisCheckResultNoSupport,
    DiagnosisCheckResultUnknown,
    DiagnosisCheckResultOk,
    DiagnosisCheckResultNg,
    DiagnosisCheckResultLost1,
    DiagnosisCheckResultLost2,
    DiagnosisCheckResultLost3,
    DiagnosisCheckResultLost,
    DiagnosisCheckResultFound,
    DiagnosisCheckResultNotFound,
};

@interface CheckResultUserDefaults : SimpleUserDefaults

@property (nonatomic) DiagnosisCheckResult wifi3gCheckResult;
@property (nonatomic) DiagnosisCheckResult bluetoothCheckResult;
@property (nonatomic) DiagnosisCheckResult gpsCheckResult;
@property (nonatomic) DiagnosisCheckResult compassCheckResult;
@property (nonatomic) DiagnosisCheckResult magneticCheckResult;
@property (nonatomic) DiagnosisCheckResult proximityCheckResult;
@property (nonatomic) DiagnosisCheckResult luminaCheckResult;
@property (nonatomic) DiagnosisCheckResult vibrationCheckResult;
@property (nonatomic) DiagnosisCheckResult recordCheckResult;
@property (nonatomic) DiagnosisCheckResult soundCheckResult;
@property (nonatomic) DiagnosisCheckResult touchCheckResult;
@property (nonatomic) DiagnosisCheckResult screenCheckResult;
@property (nonatomic) DiagnosisCheckResult cameraCheckResult;
@property (nonatomic) DiagnosisCheckResult batteryCheckResult;
@property (nonatomic) DiagnosisCheckResult simCardCheckResult;
@property (nonatomic) BOOL shouldShowIMEIButton;
@property (nonatomic) BOOL shouldShowPriceButton;
@property (nonatomic) NSString *imeiCodeString;

@property (nonatomic) NSString *authCode;

+ (instancetype)standardUserDefaults;

+ (NSString *)resultString:(DiagnosisCheckResult)result;
+ (UIColor *)valueColorByResult:(DiagnosisCheckResult)result;
+ (UIColor *)valueColor:(NSString *)value;
+ (NSString *)sensorResultAPIString;
+ (NSString *)communicationResultAPIString;
+ (NSString *)resultAPIStringForSim:(DiagnosisCheckResult)result;
+ (NSString *)resultAPIString:(DiagnosisCheckResult)result;
+ (NSString *)diagnosisResultString;
+ (NSString *)diagnosisResultAPIString;
+ (NSString *)finalResultAPIString:(DiagnosisCheckResult)result;

@end
